CREATE TABLE [dbo].[TMCORP]
(
[CO_CORP] [dbo].[TD_VC_002] NOT NULL,
[NO_CORP] [dbo].[TD_VC_050] NOT NULL,
[NO_COME] [dbo].[TD_VC_020] NOT NULL,
[NV_INFO_CNTA] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TMCORP__NV_INFO___6A30C649] DEFAULT ((0)),
[NV_QUIE_CNTA] [dbo].[TD_VC_020] NOT NULL,
[ST_CORR_AUTO] [dbo].[TD_VC_001_SINO] NULL,
[UL_CORR_TRAB] [dbo].[TD_VC_020] NULL,
[DE_RUTA_FOTO] [dbo].[TD_VC_200] NULL,
[CO_MONE] [dbo].[TD_VC_003] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TMCORP__CO_USUA___6C190EBB] DEFAULT (substring(suser_sname(),(1),(8))),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TMCORP__FE_USUA___6D0D32F4] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TMCORP__CO_USUA___6E01572D] DEFAULT (substring(suser_sname(),(1),(8))),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TMCORP__FE_USUA___6EF57B66] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TMCORP] WITH NOCHECK ADD CONSTRAINT [CK__TMCORP__ST_CORR___6B24EA82] CHECK NOT FOR REPLICATION (([ST_CORR_AUTO]='N' OR [ST_CORR_AUTO]='S'))
GO
ALTER TABLE [dbo].[TMCORP] ADD CONSTRAINT [PK__TMCORP__E5EDC70A031C6FA4] PRIMARY KEY CLUSTERED  ([CO_CORP]) ON [PRIMARY]
GO
GRANT SELECT ON  [dbo].[TMCORP] TO [public]
GRANT INSERT ON  [dbo].[TMCORP] TO [public]
GRANT DELETE ON  [dbo].[TMCORP] TO [public]
GRANT UPDATE ON  [dbo].[TMCORP] TO [public]
GO
